<?php
if ($service_media != false && $service_media->num_rows() > 0) {
    foreach ($service_media->result() as $mediaitem) {

        if (trim($mediaitem->image_name) != '') {
            ?>


            <h1 style="padding:10px;"><span>Uploaded Service Image</span></h1>

            <table class="result_table">
                <tr class="header">
                    <td>&nbsp;</td>
                    <td>File</td>
                    <td>File Name</td> 
                </tr>



                <tr class="data_row">
                    <td>&nbsp;</td>
                    <td>
                        <a href="<?php echo $this->config->item("media_folder_service") . $mediaitem->image_name; ?>" target="_blank" class="thumbnail">
                            <img src='<?php echo $this->config->item("media_folder_service") . $mediaitem->image_name; ?>' />  
                        </a>
                    </td>
                    <td valign="top">
                        <?php echo $mediaitem->image_name; ?> 
                        <span class="media_url"><?php echo $this->config->item("media_folder_service") . $mediaitem->image_name; ?></span>
                    </td>

                </tr>
            </table>

            <div class="btn_area" style="padding-bottom:15px; padding-left:15px; border:none;">
                <input type="submit" name="submit" id="submit" class="input_btn" value="Delete selected photo(s)"/><br style="clear:both;"/>
            </div>

            <?php
        }//end if
    } //end foreach
}//end if
?>